package com.zsh.fmmall.service.impl;

import com.zsh.fmmall.dao.IndexImgMapper;
import com.zsh.fmmall.entity.IndexImg;
import com.zsh.fmmall.service.IndexImgService;
import com.zsh.fmmall.vo.BaseCode;
import com.zsh.fmmall.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class IndexImgServiceImpl implements IndexImgService {
    @Autowired
    private IndexImgMapper indexImgMapper;
    @Override
    public ResultVO listIndexImgs() {
//        System.out.println("service");
        List<IndexImg> indexImgs = indexImgMapper.listIndexImgs();
//        System.out.println(indexImgs.toString());
        if(indexImgs.size()==0){
//            System.out.println(indexImgs.size());
            return new ResultVO(BaseCode.no,"fasle失败",null);
        }else {
            return new ResultVO(BaseCode.ok,"success成功",indexImgs);
        }
    }
}
